\chapter{Implementation and Reproducibility Guide}
\label{app:implementation}

\section{Repository Structure}

\begin{itemize}
    \item \texttt{hierarchical\_cooperation\_book\_v2/} main LaTeX project.
    \item \texttt{data/} raw and processed outputs (\texttt{raw/<experiment\_id>/}, \texttt{processed/<analysis\_id>/}).
    \item \texttt{scripts/} automation utilities for simulation launches and analysis.
    \item \texttt{docs/templates/} report, changelog, glossary, and milestone forms.
    \item \texttt{artifacts/} curated bundles for case studies and experiments.
\end{itemize}

\section{Metadata Schema}

Metadata files (YAML) capture:
\begin{itemize}
    \item \texttt{run\_id}, \texttt{config\_version}, \texttt{git\_commit}, \texttt{timestamp}.
    \item Parameter snapshot (couplings, noise levels, governance thresholds).
    \item Instrumentation flags and metric outputs.
    \item Random seeds and hardware descriptors.
\end{itemize}

\section{Changelog and Review Logs}

Maintain \texttt{CHANGELOG.md} entries with date, author, sections affected, summary, impacted dependencies, and review requirements. Review logs track issue resolution per chapter milestone.

\section{Glossary Maintenance}

Glossary table includes term, symbol, definition, references, and notes. Update via pull requests to prevent notation drift. Chapter leads sign off on changes affecting dependent sections.

\section{Build and Compile Pipeline}

\begin{enumerate}
    \item Install LaTeX distribution with TikZ/PGF support.
    \item Run \texttt{latexmk -pdf hierarchical\_cooperation\_book.tex} inside project root.
    \item CI verifies compilation, bibliography updates (\texttt{biber}).
    \item Generated PDF stored under \texttt{artifacts/book/} with version tag.
\end{enumerate}

\section{Data Governance}

\begin{itemize}
    \item Provide \texttt{data/LICENSE} specifying usage constraints.
    \item Anonymize sensitive data before publication.
    \item Archive final datasets to DOI-backed repositories (e.g., Zenodo) with metadata alignment.
\end{itemize}

\section{Onboarding Checklist}

\begin{enumerate}
    \item Share this manual and assign chapter responsibilities.
    \item Grant repository and CI access.
    \item Review glossary, changelog practices, and risk register.
    \item Pair newcomer with mentor for first milestone cycle.
    \item Conduct toolchain walkthrough (simulation scripts, analysis notebooks).
\end{enumerate}

\section{Decision Log Template}

```
Date | Decision | Context | Alternatives | Outcome | Owner
-----|----------|---------|-------------|---------|------
2025-.. | Adopt NetLogo for exploratory phase | Chapter 7 scope | Repast-only, Mesa-only | NetLogo + Repast hybrid | Simulation Lead
```

